import Vue from 'vue'
import Vuex from 'vuex'
import mutations from './mutations'
import actions from './actions'
import getters from './getters'
import moduleA from './modules/moduleA'
import moduleB from './modules/moduleB'

Vue.use(Vuex)

const state = {
  count: 0,
  students: [
    {id: 110, name: 'wsq', age: 18},
    {id: 111, name: 'kobe', age: 21},
    {id: 112, name: 'lucy', age: 25},
    {id: 113, name: 'toma', age: 30}
  ],
  info: {
    name: 'ZhSan',
    age: 18
  }
}

export default new Vuex.Store({
  state,
  mutations,
  actions,
  getters,
  modules: {
    moduleA,
    moduleB
  }
})
